﻿<Page
    x:Class="Sample1.MainPage"
	x:Name="root"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Sample1"
	xmlns:dxaml="using:DXBase.XAML"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

	<dxaml:ScenePanel x:Name="scenePanel" Scene="{Binding Current, ElementName=root}">
		<Grid>

			<StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Left">
				
				<StackPanel Background="#40000000" Width="120" Margin="10" Orientation="Horizontal" VerticalAlignment="Center">
					<TextBlock  Foreground="White" Text="{Binding PerformanceTimer.FPS, ElementName=scenePanel}" FontSize="23" Margin="3"/>
					<TextBlock Foreground="White" Margin="3" Text="FPS" FontSize="23"/>
				</StackPanel>

				<Button 
					Foreground="Black" Background="LightGray"
					Content="Save" Click="DoSave"
					Width="100" Margin="10" VerticalAlignment="Center"
					/>

				<Button 
					Foreground="Black" Background="LightGray"
					Content="Reset" Click="DoReset"
					Width="100" Margin="10" VerticalAlignment="Center"
					/>

				<ComboBox
					Width="150" Margin="10" VerticalAlignment="Center"
					ItemsSource="{Binding Universes, ElementName=root}"
					SelectedItem="{Binding Current, ElementName=root, Mode=TwoWay}"
					DisplayMemberPath="Name"
					/>
				
				<TextBlock Text="{Binding Loading, ElementName=root}" VerticalAlignment="Bottom" Margin="10" />

			</StackPanel>

			<StackPanel Orientation="Vertical" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10" Background="#40000000" >

				<CheckBox Margin="10" HorizontalAlignment="Left" Content="Updating" 
						  IsChecked="{Binding Current.Updating, ElementName=root, Mode=TwoWay}"/>
				<CheckBox Margin="10" HorizontalAlignment="Left" Content="Wireframe" 
						  IsChecked="{Binding Current.RasterizerState.Wireframe, ElementName=root, Mode=TwoWay}"/>
				<ComboBox Margin="10" HorizontalAlignment="Left" 
						  ItemsSource="{Binding Current.CullModes, ElementName=root}" 
						  SelectedItem="{Binding Current.RasterizerState.CULL_MODE, ElementName=root, Mode=TwoWay}"/>

			</StackPanel>

		</Grid>
	</dxaml:ScenePanel>
	
</Page>
